/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "menumodifires")
@XmlRootElement(name = "menumodifires")
@NamedQueries({
    @NamedQuery(name = "Menumodifires.findAll", query = "SELECT m FROM Menumodifires m"),
    @NamedQuery(name = "Menumodifires.findByMenumodifireID", query = "SELECT m FROM Menumodifires m WHERE m.menumodifireID = :menumodifireID"),
    @NamedQuery(name = "Menumodifires.findByDescription", query = "SELECT m FROM Menumodifires m WHERE m.description = :description"),
    @NamedQuery(name = "Menumodifires.findByIsdeleted", query = "SELECT m FROM Menumodifires m WHERE m.isdeleted = :isdeleted")})
public class Menumodifires implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "MenumodifireID")
    private Long menumodifireID;
    @Column(name = "description")
    private String description;
    @Column(name = "isdeleted")
    private Boolean isdeleted;
    @JoinColumn(name = "modifiremaster_MenumodifireID", referencedColumnName = "ModifireID")
    @ManyToOne(optional = false)
    private Modifiremaster modifiremaster;
    @JoinColumn(name = "menu_MenuID", referencedColumnName = "MenuID")
    @ManyToOne(optional = false)
    private Menu menu;

    public Menumodifires() {
    }

    public Menumodifires(Long menumodifireID) {
        this.menumodifireID = menumodifireID;
    }

    public Long getMenumodifireID() {
        return menumodifireID;
    }

    public void setMenumodifireID(Long menumodifireID) {
        this.menumodifireID = menumodifireID;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    public Modifiremaster getModifiremaster() {
        return modifiremaster;
    }

    public void setModifiremaster(Modifiremaster modifiremaster) {
        this.modifiremaster = modifiremaster;
    }

    public Menu getMenu() {
        return menu;
    }

    public void setMenu(Menu menu) {
        this.menu = menu;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (menumodifireID != null ? menumodifireID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Menumodifires)) {
            return false;
        }
        Menumodifires other = (Menumodifires) object;
        if ((this.menumodifireID == null && other.menumodifireID != null) || (this.menumodifireID != null && !this.menumodifireID.equals(other.menumodifireID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Menumodifires[menumodifireID=" + menumodifireID + "]";
    }

}
